#!/usr/bin/make -f

include debian/variables.mk
include debian/gencontrol.mk

%:
	dh $@ --with gir

override_dh_auto_clean: gen_control
	dh_auto_clean

override_dh_auto_configure: gen_control
	dh_auto_configure -- \
	    -DCMAKE_BUILD_TYPE=Release \
	    -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
	    -DSYSCONFDIR=/etc \
	    -DENABLE_X11=ON \
	    -DENABLE_GLIB2=ON \
	    -DENABLE_CAIRO=ON \
	    -DENABLE_DBUS=ON \
	    -DENABLE_PANGO=ON \
	    -DENABLE_XKB=ON \
	    -DENABLE_DEBUG=OFF \
	    -DENABLE_PINYIN=ON \
	    -DENABLE_TABLE=ON \
	    -DENABLE_GTK2_IM_MODULE=ON \
	    -DENABLE_GTK3_IM_MODULE=ON \
	    -DENABLE_QT=OFF \
	    -DENABLE_LUA=ON \
	    -DENABLE_STATIC=OFF \
	    -DENABLE_TEST=ON \
	    -DENABLE_SNOOPER=ON \
	    -DENABLE_GIR=ON \
	    -DENABLE_ENCHANT=ON \
	    -DENABLE_PRESAGE=ON \
	    -DENABLE_ICU=ON \
	    -DENABLE_BACKTRACE=ON \
	    -DENABLE_XDGAUTOSTART=ON \
	    -DENABLE_GETTEXT=ON \
		-DENABLE_INTEL_PRODUCT=ON \
	    -DENCHANT_INCLUDE_DIR=/usr/share/enchant-2/ \
	    -DENCHANT_LIBRARIES=/usr/lib/$(DEB_HOST_MULTIARCH)/libenchant-2.so.2

override_dh_missing:
	dh_missing --fail-missing

override_dh_makeshlibs:
	dh_makeshlibs -plibfcitx-core0
	dh_makeshlibs -plibfcitx-config4
	dh_makeshlibs -plibfcitx-utils0
	dh_makeshlibs -plibfcitx-gclient1
